package com.wjl.cli;


import com.wjl.cli.command.ConfigCommand;
import com.wjl.cli.command.GeneratorCommand;
import com.wjl.cli.command.ListCommand;
import picocli.CommandLine;
import picocli.CommandLine.Command;

@Command(name = "generator",mixinStandardHelpOptions = true)
public class CommandExecutor implements Runnable {

    final CommandLine commandLine;
    {
      commandLine= new CommandLine(this)
                .addSubcommand(new GeneratorCommand())
                .addSubcommand(new ConfigCommand())
                .addSubcommand(new ListCommand());
    }


    @Override
    public void run() {
        System.out.println("请输入具体命令，--help 查看帮助");
    }
    public  void  doExecutor(String[] args) {
        commandLine.execute(args);
    }
}
